﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SuperJoe.Framework.Caching
{
    public interface ICache
    {
        T Get<T>(string key);

        Task<T> GetAsync<T>(string key);

        bool Add<T>(string key, T value, TimeSpan? expiresIn = null);

        Task<bool> AddAsync<T>(string key, T value, TimeSpan? expiresIn = null);

        bool Remove(string key);

        Task<bool> RemoveAsync(string key);
    }
}
